1. Field of the Invention
This invention relates to systems and methods for executing commands in distributed systems.
2. Description of the Related Art
In a distributed system, operations are performed by a plurality of network nodes. Typical transactions include a series of commands that are executed sequentially by the distributed system. For example, FIG. 1 illustrates a flowchart of a transaction 100 comprising a plurality of commands executed on a computer network (not shown) having a local node that initiates the transaction 100 and one or more remote nodes that participate in the transaction 100. The elapsed time from a start 106 of the transaction 100 to an end 108 of the transaction 100 is affected by factors such as waiting for network resources to become available, waiting for commands to execute, waiting to receive responses to sent messages, or the like.
After starting 106 the transaction 100, the computer network executes a first command 110 (shown as “CMD_A”). The first command 110 may be executed on the local node, sent to one or more remote nodes, or both. The computer network may wait for the first command 110 to be completed before continuing with the transaction 100. If, for example, the first command 110 is sent to one or more remote nodes for execution thereon, the local node will wait until it receives a response from each of the remote nodes.
Once the first command 110 is complete, the computer network executes a second command 120 (shown as “CMD_B”). The computer network waits for the second command 120 to be completed before executing a third command 130 (shown as “CMD_C”). Again, the computer network waits for the third command 130 to be completed before executing a fourth command 140 (shown as “CMD_D”). Once the fourth command 140 is completed, the transaction 100 ends 108.
System resources, such as the availability of central processing units to execute the commands 110, 120, 130, 140 or bandwidth to send messages across the computer network, may be underutilized as the computer network waits for each command 110, 120, 130, 140 to execute in turn. For example, one or more of the nodes may be idle or may have extra processing capabilities available that are not used while the computer network waits for other nodes to complete their tasks. This occurs even if the underutilized system resources have sufficient data available to them to perform subsequent operations. For example, if all of the data and resources necessary to execute both the first command 110 and the third command 130 is available at the start 106 of the transaction 100, waiting for the first command 110 and the second command 120 to be completed before executing the third command 130 adds unnecessary delay to overall transaction 100.